package com.example.math;

import net.sf.jsqlparser.expression.LongValue;

public class NumberMath {
    /**
     * Math包含了用于执行基本数学运算的属性和方法，如初等指数，对数，平方根和三角函数
     * Math的方法都被定义为static 通过Math类可以在主函数中直接调用
     */

    public static void main(String []args){
        System.out.println("90 度的正弦值：" + Math.sin(Math.PI/2));
        System.out.println("0度的余弦值：" + Math.cos(0));
        System.out.println("60度的正切值：" + Math.tan(Math.PI/3));
        System.out.println("1的反正切值： " + Math.atan(1));
        System.out.println("π/2的角度值：" + Math.toDegrees(Math.PI/2));
        System.out.println(Math.PI);

        double random = Math.random();
        System.out.println("绝对值："+Math.abs(-7));
        System.out.println("四舍五入："+Math.round(5.32));
        System.out.println("返回与参数最接近的整数："+Math.rint(5.32));
        int a = 55;
        Integer c = 77;
        String b = "666";
        Integer.valueOf(b).toString();
        new LongValue(a);
        if (b.equals(a)){}
        c.compareTo(4);Integer.parseInt(b);

    }
}
